package com.mobimagic.lockscreen.util;

import android.content.Context;
import android.content.Intent;
import android.util.Log;

import com.mobimagic.lockscreen.AppEnv;
import com.mobimagic.lockscreen.activity.MobileChargingActivity;
import com.mobimagic.lockscreen.view.FastChargeTipsActivity;

/**
 * @author liule-ms
 * @file IntentSkip.java
 * @date 2014年10月17日 下午3:50:40
 * @description 用于管理Intent跳转
 */
public class IntentSkip {
    private static final String TAG = "IntentSkip";
    private static final boolean DEBUG = AppEnv.bAppdebug;

    public static void skipToBatteryCharging(Context c, int from) {
        if (DEBUG) {
            Log.i(TAG, "from==" + from);
        }
        Intent intent = new Intent(c, MobileChargingActivity.class);
        intent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
        intent.putExtra(MobileChargingActivity.EXTRA_FROM, from);
        c.startActivity(intent);
    }

    public static void skipToFastChargeTipsActivity(Context c, int type) {
        Intent intent = new Intent(c, FastChargeTipsActivity.class);
        intent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
        intent.putExtra("type", type);
        c.startActivity(intent);
    }
}
